package com.dg.acb.utils;

import android.content.pm.ComponentInfo;
import android.content.pm.ResolveInfo;

public class ResolveInfoUtil {

    public static ComponentInfo getComponentInfo(ResolveInfo info) {
        if (info.activityInfo != null)
            return info.activityInfo;
        if (info.serviceInfo != null)
            return info.serviceInfo;
        throw new IllegalStateException("Missing ComponentInfo!");
    }
}
